package Cafezam;

public class J12Sungjuk {

	public static void main(String[] args) {
		SungJuk tahee = new SungJuk();
		SungJuk suji = new SungJuk();
		SungJuk jihyun = new SungJuk();
		tahee.name="태희";
		tahee.kor=99;
		tahee.eng=99;
		tahee.mat=79;
		System.out.println(tahee.getTot());
		System.out.println(tahee.name);
		System.out.println(tahee.getAvg());
		System.out.println(tahee.getGrd());
		


	}//main

}//class
class SungJuk
{
	String name;
	int kor;
	int eng;
	int mat;
	int tot;
	double avg;
	char grd;
	
	public int getTot(){
	   return	kor+eng+mat;
		
	}
	public double getAvg(){
		return (double)getTot()/3;
	}
	public char getGrd()
	{
		switch((int)avg/10)
		{
		case 10: 
		case 9: grd='수';break;
		case 8: grd='우';break;
		case 7: grd='미';break;
		case 6: grd='양';break;
		default:grd='가';
		}
		return grd;
	}
	
}//class

